Efficiently storing indented threads in a threaded discussion application

ABSTRACT

A method, apparatus, and computer-readable media for retrieving records in a hierarchical set of the records having a plurality of hierarchical levels and a plurality of hierarchical depths, each of the records having a tag that is unique within the hierarchical set of the records, comprises identifying one of the records in the hierarchical set of the records; modifying the tag, thereby producing a key; indexing the hierarchical set of the records only once, thereby selecting one or more of the records within the hierarchical set of the records, wherein indexing the hierarchical set of the records only once comprises applying the key to the hierarchical set of the records; and retrieving the selected records.

CROSS REFERENCE APPLICATION

This application is a continuation application of U.S. patentapplication Ser. No. 10/085,780, filed on Feb. 28, 2002 which areassigned to the same assignee as the present application and are herebyincorporated by reference.

BACKGROUND

The present invention relates generally to data management, andparticularly to managing data stored hierarchically.

Hierarchical data sets are useful and popular. Such data sets aregenerally composed of multiple records. In a hierarchical set ofrecords, a record can have multiple “children,” which are related to therecord and exist at a lower level of the hierarchy. Such a record isreferred to as the “parent” record of the children records. The childrenof a record may have children, and so on, limited only by the size ofthe database. Within a set of children of a single record, it is oftenuseful to order the children, such that there is a first child, a secondchild, and so on.

To date the utility of these hierarchical data sets has been limited bythe efficiency of the tools available for managing the data.Conventional methods of storing hierarchical data in a database involvemultiple expensive calls to update and/or query the database. Forexample, in order to select the second grandchild of a record, threequeries are necessary. The first query selects the child of the record.The second query selects the first child of the child. The third queryselects the second child of the child.

SUMMARY

In general, in one aspect, the invention features a method, apparatus,and computer-readable media for retrieving records in a hierarchical setof the records having a plurality of hierarchical levels and a pluralityof hierarchical depths, each of the records having a tag that is uniquewithin the hierarchical set of the records. It comprises identifying oneof the records in the hierarchical set of the records; modifying thetag, thereby producing a key; indexing the hierarchical set of therecords only once, thereby selecting one or more of the records withinthe hierarchical set of the records, wherein indexing the hierarchicalset of the records only once comprises applying the key to thehierarchical set of the records; and retrieving the selected records.

Particular implementations can include one or more of the followingfeatures. Applying comprises selecting those of the records in thehierarchical set of the records having a tag that matches the key.Identifying one of the records comprises receiving a selection of theone of the records from a user; and receiving a command from the user;and wherein modifying the tag is based on the command from the user.Each of the records has one or more fields, and implementations cancomprise displaying a field of each of the retrieved records on adisplay, wherein the position of each of the fields on the displayrepresents the hierarchical depth and hierarchical level of thecorresponding one of the retrieved records. Each tag is a number havinga plurality of digits; the position of each of the digits represents oneof the hierarchical depths; the value of each of the digits representsone of the hierarchical levels; and modifying the tag comprisesselecting at least one of the digits according to the command from theuser; and changing the value of the selected digits according to thecommand from the user. Each tag is a number having a plurality ofdigits; the position of each of the digits represents one of thehierarchical depths; the value of each of the digits represents one ofthe hierarchical levels; the command from the user requests retrievingthe children of the identified record; and modifying the tag comprisesselecting the digit corresponding to the hierarchical depth of theidentified record; and setting the value of each digit corresponding toa hierarchical depth below the hierarchical depth corresponding to theselected digit to a wildcard value. Each tag is a number having aplurality of digits; the position of each of the digits represents oneof the hierarchical depths; the value of each of the digits representsone of the hierarchical levels; the command from the user requestsretrieving the parent of the identified record; and modifying the tagcomprises selecting the digit corresponding to the hierarchical depth ofthe identified record; and setting the value of the selected digit to anull value. Each of the records represents one of a message and afolder.

In general, in one aspect, the invention features a method, apparatus,and computer-readable media for adding a new record to a hierarchicalset of records having a plurality of hierarchical levels and a pluralityof hierarchical depths, each of the records in the hierarchical set ofrecords having a tag that is unique within the hierarchical set ofrecords. It comprises identifying one of the records in the hierarchicalset of records as the parent of the new record; modifying the tag,thereby producing a key; adding the key to the new record; and indexingthe hierarchical set of records only once, thereby adding the new recordto the hierarchical set of records, wherein indexing the hierarchicalset of records only once comprises applying the key to the hierarchicalset of records.

Particular implementations can include one or more of the followingfeatures. Identifying one of the records comprises receiving a selectionof the one of the records from a user. Each tag is a number having aplurality of digits; the position of each of the digits represents oneof the hierarchical depths; the value of each of the digits representsone of the hierarchical levels; the identified record represents amessage; identifying one of the records further comprises receiving acommand from the user that requests replying to the message; andmodifying the tag comprises selecting the digit corresponding to thehierarchical depth immediately below the hierarchical depth of theidentified record; and incrementing the value of the selected digit.Applying comprises selecting those of the records in the hierarchicalset of the records having a tag that matches the key. Each tag includesa plurality of digits; the position of each of the digits represents oneof the hierarchical depths; and the value of each of the digitsrepresents one of the hierarchical levels.

In general, in one aspect, the invention features a method, apparatus,and computer-readable media for selecting records in a hierarchical setof the records having a plurality of hierarchical levels and a pluralityof hierarchical depths, each of the records having a tag that is uniquewithin the hierarchical set of the records. It comprises identifying oneof the records in the hierarchical set of the records; modifying thetag; and indexing the hierarchical set of the records only once, therebyselecting one or more of the records within the hierarchical set of therecords, wherein indexing the hierarchical set of the records only oncecomprises applying the modified tag to the hierarchical set of therecord.

Particular implementations can include one or more of the followingfeatures. Each tag includes a plurality of digits; the position of eachof the digits represents one of the hierarchical depths; and the valueof each of the digits represents one of the hierarchical levels.Applying comprises selecting those of the records in the hierarchicalset of the records having a tag that matches the key.

Advantages that can be seen in implementations of the invention includeone or more of the following. Implementations of the present inventionpermit manipulation of a database representing an indented threadeddiscussion with only a single access of the database. For examples,messages can be added, deleted, and retrieved through a single databaseaccess such as a query or call.

The details of one or more implementations are set forth in theaccompanying drawings and the description below. Other features will beapparent from the description and drawings, and from the claims.

DESCRIPTION OF DRAWINGS

FIG. 1 shows a display of an indented threaded discussion.

FIG. 2 is a flowchart of a process for retrieving the parent of amessage in an indented threaded discussion according to oneimplementation.

FIG. 3 is a flowchart of a process for retrieving the children of amessage in an indented threaded discussion according to oneimplementation.

FIG. 4 is a flowchart of a process for adding a message to an indentedthreaded discussion according to one implementation.

The leading digit(s) of each reference numeral used in thisspecification indicates the number of the drawing in which the referencenumeral first appears.

DETAILED DESCRIPTION

One common type of hierarchical data is an indented threaded discussion.Originally found only in Internet newsgroups, indented threadeddiscussions have found increasing popularity as a way to manage anddisplay a discussion among multiple participants. Indented threadeddiscussion management tools are now found in consumer products such aselectronic mail software programs.

FIG. 1 shows a display of an indented threaded discussion. An indentedthreaded discussion begins when a user posts a message 102 in a forumavailable to multiple users, where the posted message is not a reply toanother message. Such a message is referred to herein as the “origin”message of the discussion. Any origin message constitutes the “head” ofa thread. Thus message 102 is both the origin message of a discussionand the head of a thread. All replies to a message are part of thethread. Of course, a forum can have multiple discussions.

When a user posts a reply to a message, the reply is generally displayedunderneath the message, and indented once. Any message having replies toit is the head of a thread. Thus a discussion can have many threads. Thehead of thread is indented once relative to the message to which itreplies.

Message 104 is a reply to message 102. Therefore, reply 104 is displayedunderneath message 102, and indented once, as shown in FIG. 1. A reply106 to the reply 104 is indented once further. A reply 108 to the reply106 to the reply 104 is indented once further still.

When a user posts another reply 110 to origin message 102, it is shownindented only once, and is shown beneath message 104 and its children106 and 108. A subsequent reply 112 to origin message 102 is also shownindented once, and is shown beneath message 110. A reply 114 to message112 is shown indented twice and beneath message 112.

A display such as the display of FIG. 1 allows a user to rapidlyunderstand the structure of the discussion hierarchy and the place eachmessage has in the hierarchy. The place a message has in the hierarchycan be described in terms of two dimensions of the hierarchy: level anddepth. The depth of a message is the number of threads that contain themessage. For example, referring to FIG. 1, the depth of message 108 isthree because it is contained by the threads headed by messages 106, 104and 102. The depth of an origin message such as message 102 is zero.

The level of a message at a particular depth represents the number ofmessages at that particular depth that precede that message. Forexample, referring to FIG. 1, the level of message 112 is three becauseit has a depth of one and is preceded by messages 110 and 104, both alsoat a depth of one. The order of precedence within each hierarchicaldepth can be determined by any number of factors or combinationsthereof. In a threaded discussion group, the chronological order of themessages, as determined by the time and date of the posting of eachmessage, is most commonly used. When the records in the hierarchicaldata set represent containers such as folders, the alphabetical order ofthe names of the folders can be used. In addition, the user of thedisplay may select any field in the records, and thereby cause thecontents of that field to determine the order of precedence. The levelof an origin message such as message 102 is zero.

Referring again to FIG. 1, messages at a single hierarchical level, suchas messages 104, 110, and 112, are shown in chronological order, whilethe children of a message (that is, replies to the message, replies tothose replies, and so on) are shown beneath the message and above thenext message at the same hierarchial level. The messages displayed tothe user are generally stored in some sort of database such as a table.Each row of the table represents a message. Each message has multiplefields such as subject, author, text, date of posting, and so on. Eachcolumn represents one of the fields.

Conventional tools for managing such indented threaded discussions arenotoriously inefficient. Normally either multiple rows of the table mustbe updated upon the creation of a new message or multiple queries haveto be performed to display an indented thread. The number of rowsneeding updates could be as large as the number of messages in thethread.

Implementations of the present invention associate a tag with eachrecord in a hierarchical set of records, such that the tag is uniquewithin the hierarchical set of records. The tag is generally one of thefields of the records. Table 1 depicts a portion of a database tablerepresenting the discussion of FIG. 1 according to one implementation.TABLE 1 Tag Depth Level Subject 0000 0 0 Bike Rides in the Bay Area 10001 1 Old La Honda 1100 2 1 re: Old La Honda 1110 3 1 re: re: Old La Honda2000 1 2 Page Mill Road 3000 1 3 The Bears Loop 3100 2 1 re: The BearsLoop

Each tag is a number having a plurality of digits, one for each of thedepths of the hierarchy. The hierarchy of Table 1 has four depths; thuseach tag has four digits. In one implementation, the digits are arrangedso that the most significant digit represents the first depth of thehierarchy (that is, the depth of the origin message), the next mostsignificant digit represents the second depth of the hierarchy, and soon. Other implementations employ other arrangements of the digits.

The value of each digit represents a level in the hierarchy. Assume thehierarchy of Table 1 has four levels. Then each digit can have a valuesranging from zero to three. A value of zero indicates that the messagedoes not exist at that depth in the hierarchy. Of course, other rangesof levels and depths can be supported, as will be apparent to oneskilled in the relevant art after reading this description. Oneimplementation supports 16 levels and 16 depths. In that implementation,the tag is a 16-digit hexadecimal number represented by a “big int,” asigned 64-bit number having values ranging from −2⁶³ to 2⁶³.

Each tag uniquely identifies the position of its record in thehierarchy. For example, the tag “3100” shows that the record is thefirst child of the third child of the origin message.

One advantage of the disclosed tag is that the tag of a record may bedetermined quickly and easily, without indexing the database, bymodifying the tag of a related record.

FIG. 2 is a flowchart of a process 200 for retrieving the parent of amessage in an indented threaded discussion according to oneimplementation. Process 200 receives a command from a user (step 202).The command identifies message 108 and requests retrieving the parent ofmessage 108. Process 200 modifies the tag of message 108 to produce akey. To do this, process 200 first selects the digit corresponding tothe hierarchical depth of message 108 (step 204). Referring to Table 1,message 108 has a depth of three. Therefore, process 200 selects thethird most significant digit of the tag of message 108. The depth ofeach message need not be stored in the table, but can be determined inreal time, with knowledge of the hierarchical depth represented by eachdigit. Where tags have digits arranged according to increasing depths inthe hierarchy, such as the tags of Table 1, one can select the digitcorresponding to the hierarchical depth of a message by simply selectthe least significant non-zero digit.

Process 200 then sets the value of the selected digit to a null value(step 206). In the tags of Table 1, the null value is zero. Of course,other values can be selected as the null value. The resulting key is“1100”, which is the tag of message 106, the parent of message 108.Process 200 then indexes the database only once by applying the key tothe database (step 208), thereby selecting the record for message 106.Process 200 then retrieves message 106 (step 210) and displays message106 to the user (step 212).

FIG. 3 is a flowchart of a process 300 for retrieving the children of amessage in an indented threaded discussion according to oneimplementation. Process 300 receives a command from a user (step 302).The command identifies message 104 and requests retrieving all of themessages in the thread for which message 104 is the head. These messagesinclude the children of message 104, the children of the children ofmessage 104, and so on.

Process 300 modifies the tag of message 104 to produce a key. To dothis, process 300 first selects the digit corresponding to thehierarchical depth of message 104 (step 304). Referring to Table 1,message 104 has a depth of one. Therefore, process 300 selects the mostsignificant digit of the tag of message 104. Process 300 then sets thevalue of each digit corresponding to a hierarchical depth below thehierarchical depth of the selected digit to a wildcard value (step 308).The resulting key is “1XXX”, where “X” represents a wildcard value thatcan match any value.

In one implementation, applying a key to the database selects allrecords in the database having tags that match the key. Process 300indexes the database only once by applying the key to the database (step310), thereby selecting the records for the messages in the threadheaded by message 104. Referring to Table 1, the key “1XXX” matches thetags for records corresponding to messages 106 and 108. Process 300 thenretrieves messages 106 and 108 (step 312) and displays messages 106 and108 to the user (step 314).

Process 300 can also be used to delete a message. When a message isdeleted, so are all of its children. Process 300 selects a message andall of its children. The records corresponding to the selected messagesare then deleted.

FIG. 4 is a flowchart of a process 400 for adding a message to anindented threaded discussion according to one implementation. Process400 receives a command from a user (step 402). The command identifiesmessage 114 and requests replying to message 114. Process 400 modifiesthe tag of message 114 to produce a key. To do this, process 400 firstselects the digit corresponding to the hierarchical depth immediatelybelow the hierarchical depth of message 114 (step 404). Referring toTable 1, message 114 has a depth of two. Therefore, process 400 selectsthe third most significant digit of the tag of message 104. Process 400then increments the value of selected digit (step 406). The resultingkey is “3110”. Process 400 then indexes the database only once by addinga record to the database having the key as its tag (step 408). Therecord corresponds to the new message.

The invention can be implemented in digital electronic circuitry, or incomputer hardware, firmware, software, or in combinations of them.Apparatus of the invention can be implemented in a computer programproduct tangibly embodied in a machine-readable storage device forexecution by a programmable processor; and method steps of the inventioncan be performed by a programmable processor executing a program ofinstructions to perform functions of the invention by operating on inputdata and generating output. The invention can be implementedadvantageously in one or more computer programs that are executable on aprogrammable system including at least one programmable processor,coupled to receive data and instructions from, and to transmit data andinstructions to, a data storage system, at least one input device, andat least one output device. Each computer program can be implemented ina high-level procedural or object-oriented programming language, or inassembly or machine language if desired; and in any case, the languagecan be a compiled or interpreted language. Suitable processors include,by way of example, both general and special purpose microprocessors.Generally, a processor will receive instructions and data from aread-only memory and/or a random access memory. Generally, a computerwill include one or more mass storage devices for storing data files;such devices include magnetic disks, such as internal hard disks andremovable disks; magneto-optical disks; and optical disks. Storagedevices suitable for tangibly embodying computer program instructionsand data include all forms of non-volatile memory, including by way ofexample semiconductor memory devices, such as EPROM, EEPROM, and flashmemory devices; magnetic disks such as internal hard disks and removabledisks; magneto-optical disks; and CD-ROM disks. Any of the foregoing canbe supplemented by, or incorporated in, ASICs (application-specificintegrated circuits).

A number of implementations of the invention have been described.Nevertheless, it will be understood that various modifications may bemade without departing from the spirit and scope of the invention.Accordingly, other implementations are within the scope of the followingclaims.

1: A computer-implemented method for retrieving a record in ahierarchical set of records having a plurality of hierarchical levelsand a plurality of hierarchical depths, each of the records having a tagthat is unique within the hierarchical set of the records, the methodcomprising: identifying a first record in the hierarchical set ofrecords; selecting a second record by indicating a relationalcharacteristic of the identified record that comprises a depthrelationship or a level relationship or both; modifying the tag based onthe relational characteristic and a predetermined numeric mapping ofrelated records, thereby producing a key corresponding to the secondrecord that is related to the identified record by the relationalcharacteristic; indexing the hierarchical set of the records, therebyselecting the second record within the hierarchical set of records,wherein indexing the hierarchical set of records comprises applying thekey to the hierarchical set of records; and retrieving the selectedsecond record. 2: The method of claim 1, wherein applying comprises:selecting a further record in the hierarchical set of the records havinga tag that matches the key. 3: The method of claim 1, whereinidentifying the first record comprises: receiving a selection of thefirst record from a user; and receiving a command from the user; andwherein modifying the tag is based on the command from the user. 4: Themethod of claim 3, wherein each of the records has one or more fields,further comprising displaying a field of each of the retrieved recordson a display, wherein the position of each of the fields on the displayrepresents the hierarchical depth and hierarchical level of thecorresponding one of the retrieved records. 5: The method of claim 1,wherein: each tag is a number having a plurality of digits; the positionof each of the digits represents one of the hierarchical depths; thevalue of each of the digits represents one of the hierarchical levels;and modifying the tag comprises: selecting at least one of the digitsaccording to the command from the user; and changing the value of theselected digits according to the command from the user. 6: The method ofclaim 1, wherein: each tag is a number having a plurality of digits; theposition of each of the digits represents one of the hierarchicaldepths; the value of each of the digits represents one of thehierarchical levels; the command from the user requests retrieving thechildren of the identified record; and modifying the tag comprises:selecting the digit corresponding to the hierarchical depth of theidentified first record; and setting the value of each digitcorresponding to a hierarchical depth below the hierarchical depthcorresponding to the selected digit to a wildcard value. 7: The methodof claim 1, wherein: each tag is a number having a plurality of digits;the position of each of the digits represents one of the hierarchicaldepths; the value of each of the digits represents one of thehierarchical levels; the command from the user requests retrieving theparent of the identified first record; and modifying the tag comprises:selecting the digit corresponding to the hierarchical depth of theidentified first record; and setting the value of the selected digit toa null value. 8: The method of claim 1, wherein each of the recordsrepresents one of a message and a folder. 9: A computer-implementedmethod for selecting a record in a hierarchical set of records having aplurality of hierarchical levels and a plurality of hierarchical depths,each of the records having a tag that is unique within the hierarchicalset of records, the method comprising: identifying a first record in thehierarchical set of records; selecting a second record by indicating arelational characteristic of the identified first record that comprisesa depth relationship or a level relationship or both; modifying the tagbased on the relational characteristic and a predetermined numericmapping of related records; and indexing the hierarchical set ofrecords, thereby selecting the second record within the hierarchical setof records, wherein indexing the hierarchical set of records comprisesapplying the modified tag to the hierarchical set of records. 10: Themethod of claim 9, wherein: each tag includes a plurality of digits; theposition of each of the digits represents one of the hierarchicaldepths; and the value of each of the digits represents one of thehierarchical levels. 11: The method of claim 9, wherein applyingcomprises: selecting a further record in the hierarchical set of therecords having a tag that matches the modified tag. 12: At least onecomputer programmed to execute a process for retrieving records in ahierarchical set of the records having a plurality of hierarchicallevels and a plurality of hierarchical depths, each of the recordshaving a tag that is unique within the hierarchical set of the records,the process comprising: identifying a first record in the hierarchicalset of records; selecting a second record by indicating a relationalcharacteristic of the identified record that comprises a depthrelationship or a level relationship or both; modifying the tag based onthe relational characteristic and a predetermined numeric mapping ofrelated records, thereby producing a key corresponding to the secondrecord that is related to the identified record by the relationalcharacteristic; indexing the hierarchical set of the records, therebyselecting the second record within the hierarchical set of records,wherein indexing the hierarchical set of records comprises applying thekey to the hierarchical set of records; and retrieving the selectedsecond record. 13: The computer of claim 12, wherein applying comprises:selecting a record in the hierarchical set of the records having a tagthat matches the key. 14: The computer of claim 12, wherein identifyingthe first record comprises: receiving a selection of the first recordfrom a user; and receiving a command from the user; and whereinmodifying the tag is based on the command from the user. 15: Thecomputer of claim 14, wherein each of the records has one or morefields, and the process further comprises: displaying a field of each ofthe retrieved records on a display, wherein the position of each of thefields on the display represents the hierarchical depth and hierarchicallevel of the corresponding one of the retrieved records. 16: Thecomputer of claim 12, wherein: each tag is a number having a pluralityof digits; the position of each of the digits represents one of thehierarchical depths; the value of each of the digits represents one ofthe hierarchical levels; and modifying the tag comprises: selecting atleast one of the digits according to the command from the user; andchanging the value of the selected digits according to the command fromthe user. 17: The computer of claim 12, wherein: each tag is a numberhaving a plurality of digits; the position of each of the digitsrepresents one of the hierarchical depths; the value of each of thedigits represents one of the hierarchical levels; the command from theuser requests retrieving the children of the identified first record;and modifying the tag comprises: selecting the digit corresponding tothe hierarchical depth of the identified first record; and setting thevalue of each digit corresponding to a hierarchical depth below thehierarchical depth corresponding to the selected digit to a wildcardvalue. 18: The computer of claim 12, wherein: each tag is a numberhaving a plurality of digits; the position of each of the digitsrepresents one of the hierarchical depths; the value of each of thedigits represents one of the hierarchical levels; the command from theuser requests retrieving the parent of the identified first record; andmodifying the tag comprises: selecting the digit corresponding to thehierarchical depth of the identified first record; and setting the valueof the selected digit to a null value. 19: The computer of claim 12,wherein each of the records represents one of a message and a folder.20: At least one computer programmed to execute a process for selectingrecords in a hierarchical set of the records having a plurality ofhierarchical levels and a plurality of hierarchical depths, each of therecords having a tag that is unique within the hierarchical set of therecords, the process comprising: identifying a first record in thehierarchical set of records; selecting a second record by indicating arelational characteristic of the identified record that comprises adepth relationship or a level relationship or both; modifying the tagbased on the relational characteristic and a predetermined numericmapping of related records; and indexing the hierarchical set ofrecords, thereby selecting the second record within the hierarchical setof records, wherein indexing the hierarchical set of records comprisesapplying the modified tag to the hierarchical set of records. 21: Thecomputer of claim 20, wherein: each tag includes a plurality of digits;the position of each of the digits represents one of the hierarchicaldepths; and the value of each of the digits represents one of thehierarchical levels. 22: An apparatus for retrieving records in ahierarchical set of the records having a plurality of hierarchicallevels and a plurality of hierarchical depths, each of the recordshaving a tag that is unique within the hierarchical set of the records,the apparatus comprising: means for identifying a first record in thehierarchical set of records; means for selecting a second record byindicating a relational characteristic of the identified first record,wherein the relational characteristic comprises a depth relationship ora level relationship or both; means for modifying the tag based on therelational characteristic and a predetermined numeric mapping of relatedrecords, thereby producing a key corresponding to the second record thatis related to the identified first record by the relationalcharacteristic; means for indexing the hierarchical set of the records,thereby selecting the second record within the hierarchical set ofrecords, wherein means for indexing the hierarchical set of recordscomprises means for applying the key to the hierarchical set of records;and means for retrieving the second record. 23: The apparatus of claim22, wherein means for identifying one of the records comprises: meansfor receiving a selection of the one of the records from a user; andmeans for receiving a command from the user; and wherein modifying thetag is based on the command from the user. 24: The apparatus of claim23, wherein each of the records has one or more fields, furthercomprising means for displaying a field of each of the retrieved recordson a display, wherein the position of each of the fields on the displayrepresents the hierarchical depth and hierarchical level of thecorresponding one of the retrieved records. 25: The apparatus of claim22, wherein: each tag is a number having a plurality of digits; theposition of each of the digits represents one of the hierarchicaldepths; the value of each of the digits represents one of thehierarchical levels; and means for modifying the tag comprises: meansfor selecting at least one of the digits according to the command fromthe user; and means for changing the value of the selected digitsaccording to the command from the user. 26: The apparatus of claim 22,wherein: each tag is a number having a plurality of digits; the positionof each of the digits represents one of the hierarchical depths; thevalue of each of the digits represents one of the hierarchical levels;the command from the user requests retrieving the children of theidentified first record; and means for modifying the tag comprises:means for selecting the digit corresponding to the hierarchical depth ofthe identified record; and means for setting the value of each digitcorresponding to a hierarchical depth below the hierarchical depthcorresponding to the selected digit to a wildcard value. 27: Theapparatus of claim 22, wherein: each tag is a number having a pluralityof digits; the position of each of the digits represents one of thehierarchical depths; the value of each of the digits represents one ofthe hierarchical levels; the command from the user requests retrievingthe parent of the identified first record; and means for modifying thetag comprises: means for selecting the digit corresponding to thehierarchical depth of the identified record; and means for setting thevalue of the selected digit to a null value. 28: The apparatus of claim22, wherein each of the records represents one of a message and afolder. 29: An apparatus for selecting records in a hierarchical set ofthe records having a plurality of hierarchical levels and a plurality ofhierarchical depths, each of the records having a tag that is uniquewithin the hierarchical set of the records, the apparatus comprising:means for identifying a first record in the hierarchical set of records;means for selecting a second record by indicating a relationalcharacteristic of the identified record, wherein the relationalcharacteristic comprises a depth relationship or a level relationship orboth; means for modifying the tag based on the relational characteristicand a predetermined numeric mapping of related records; and means forindexing the hierarchical set of records, thereby selecting the secondrecord within the hierarchical set of records, wherein indexing thehierarchical set of records comprises applying the modified tag to thehierarchical set of records. 30: The apparatus of claim 29, wherein:each tag includes a plurality of digits; the position of each of thedigits represents one of the hierarchical depths; and the value of eachof the digits represents one of the hierarchical levels. 31: One or morecomputer-readable storage media embodying instructions executable by acomputer to perform a method for retrieving records in a hierarchicalset of the records having a plurality of hierarchical levels and aplurality of hierarchical depths, each of the records having a tag thatis unique within the hierarchical set of the records, the methodcomprising: identifying a first record in the hierarchical set ofrecords; selecting a second record by indicating a relationalcharacteristic of the identified first record that comprises a depthrelationship or a level relationship or both modifying the tag based onthe relational characteristic and a predetermined numeric mapping ofrelated records, thereby producing a key corresponding to the secondrecord that is related to the identified first record by the relationalcharacteristic; indexing the hierarchical set of the records, therebyselecting the second record within the hierarchical set of records,wherein indexing the hierarchical set of records comprises applying thekey to the hierarchical set of records; and retrieving the selectedsecond record. 32: The media of claim 31, wherein identifying a firstrecord comprises: receiving a selection of the first record from a user;and receiving a command from the user; and wherein modifying the tag isbased on the command from the user. 33: The media of claim 32, whereineach of the records has one or more fields, the method furthercomprising displaying a field of each of the retrieved records on adisplay, wherein the position of each of the fields on the displayrepresents the hierarchical depth and hierarchical level of thecorresponding one of the retrieved records. 34: The media of claim 31,wherein: each tag is a number having a plurality of digits; the positionof each of the digits represents one of the hierarchical depths; thevalue of each of the digits represents one of the hierarchical levels;and modifying the tag comprises: selecting at least one of the digitsaccording to the command from the user; and changing the value of theselected digits according to the command from the user. 35: The media ofclaim 31, wherein: each tag is a number having a plurality of digits;the position of each of the digits represents one of the hierarchicaldepths; the value of each of the digits represents one of thehierarchical levels; the command from the user requests retrieving thechildren of the identified first record; and modifying the tagcomprises: selecting the digit corresponding to the hierarchical depthof the identified first record; and setting the value of each digitcorresponding to a hierarchical depth below the hierarchical depthcorresponding to the selected digit to a wildcard value. 36: The mediaof claim 31, wherein: each tag is a number having a plurality of digits;the position of each of the digits represents one of the hierarchicaldepths; the value of each of the digits represents one of thehierarchical levels; the command from the user requests retrieving theparent of the identified first record; and modifying the tag comprises:selecting the digit corresponding to the hierarchical depth of theidentified first record; and setting the value of the selected digit toa null value. 37: The media of claim 31, wherein each of the recordsrepresents one of a message and a folder. 38: One or morecomputer-readable storage media embodying instructions executable by acomputer to perform a method for selecting records in a hierarchical setof the records having a plurality of hierarchical levels and a pluralityof hierarchical depths, each of the records having a tag that is uniquewithin the hierarchical set of the records, the method comprising:identifying a first record in the hierarchical set of records; selectinga second record by indicating a relational characteristic of theidentified first record that comprises a depth relationship or a levelrelationship or both; modifying the tag based on the relationalcharacteristic and a predetermined numeric mapping of related records;and indexing the hierarchical set of records, thereby selecting thesecond record within the hierarchical set of records, wherein indexingthe hierarchical set of records comprises applying the modified tag tothe hierarchical set of records. 39: The media of claim 38, wherein:each tag includes a plurality of digits; the position of each of thedigits represents one of the hierarchical depths; and the value of eachof the digits represents one of the hierarchical levels. 40: The mediaof claim 38, wherein applying comprises: selecting those of the recordsin the hierarchical set of the records having a tag that matches themodified tag.